Skip to content

Feature/dream summarization - #493

Merged
ginccc merged 7 commits into
mainfrom
feature/dream-summarization
May 20, 2026
Merged

ginccc merged 7 commits into
mainfrom
feature/dream-summarization

Conversation

@ginccc

@ginccc ginccc commented May 15, 2026

Copy link
Copy Markdown
Member

This pull request introduces LLM-driven memory summarization to the Dream background consolidation service, enabling EDDI agents to automatically compress related user memory entries using a configurable summarization process. The update adds new configuration options, documentation, metrics, and comprehensive tests to support and validate the feature.

Major new feature: LLM-driven summarization in DreamService

  • DreamService can now group and summarize user memory entries via LLM calls, reducing redundancy and improving memory efficiency. The process is highly configurable and includes robust safety guarantees to prevent data loss. [1] [2]

Configuration and API changes:

  • Added six new config fields to AgentConfiguration.DreamConfig for fine-grained control over summarization: summarizeMinEntries, summarizeTargetEntries, summarizeGroupBy, preserveAgentProvenance, maxSummarizationCalls, and summarizationPrompt, all with sensible defaults and setter/getter methods. [1] [2]
  • Updated example Dream configuration blocks and tables in documentation to reflect new summarization options and their defaults. [1] [2] [3]

Documentation and handoff updates:

  • Expanded documentation in docs/user-memory.md, docs/scheduling.md, HANDOFF.md, and docs/changelog.md to explain how LLM summarization works, its configuration, safety guarantees, and new metric (dream.entries.summarized). [1] [2] [3] [4] [5]
  • Updated the Dream section in HANDOFF.md and changelog to reflect the new feature and increased test coverage. [1] [2]

Metrics and monitoring:

  • Added a new Micrometer metric dream.entries.summarized to track the number of entries reduced via LLM consolidation. [1] [2]

Testing and validation:

  • Significantly expanded the test suite for DreamService, including 29 new tests covering summarization logic, edge cases, and safety guarantees, for a total of 37 tests. [1] [2]

Summary of most important changes:

Feature: LLM-Driven Summarization

  • Implemented summarizeInteractions() in DreamService, enabling LLM-based memory consolidation with robust safety checks and configurable grouping/limits. [1] [2]

Configuration: DreamConfig Enhancements

  • Added six new fields and corresponding accessors for summarization control in AgentConfiguration.DreamConfig. [1] [2]
  • Updated all relevant documentation and config examples to include the new summarization options. [1] [2] [3]

Documentation & Handoff

  • Revised user memory and scheduling docs to describe LLM summarization, safety guarantees, and new metrics. Updated HANDOFF.md and changelog with feature summary and test counts. [1] [2] [3] [4] [5]

Metrics

  • Registered and documented a new metric, dream.entries.summarized, for monitoring summarization activity. [1] [2]

Testing

  • Added 29 new summarization tests to DreamServiceTest, for a total of 37, ensuring correctness and safety of the new feature. [1] [2]

Summary by CodeRabbit

  • New Features

    • LLM-driven memory summarization with grouping, thresholds, call/cost caps, provenance options, and a metric for entries summarized.
  • Documentation

    • Changelog and docs updated with consolidation behavior, new configuration fields, example updates, safety guarantees, and verification notes.
  • Tests

    • Broad new/updated tests for summarization, parsing robustness, cost/call limits, grouping modes, and failure/edge cases.
  • Bug Fixes

    • Corrected documentation/test counts and adjusted Dream summary formatting and placement.

Review Change Stack

@ginccc
ginccc requested a review from rolandpickl as a code owner May 15, 2026 19:12
@ginccc
ginccc requested review from Copilot and removed request for rolandpickl May 15, 2026 19:13
@github-actions

github-actions Bot commented May 15, 2026

Copy link
Copy Markdown

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@coderabbitai

coderabbitai Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@ginccc has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 10 minutes and 35 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 572fed0a-0ed8-410e-9cf3-39cb7920423d

📥 Commits

Reviewing files that changed from the base of the PR and between d5b1640 and f41ddf9.

📒 Files selected for processing (7)
  • HANDOFF.md
  • docs/changelog.md
  • src/main/java/ai/labs/eddi/configs/agents/model/AgentConfiguration.java
  • src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java
  • src/main/java/ai/labs/eddi/modules/llm/impl/SummarizationService.java
  • src/test/java/ai/labs/eddi/configs/agents/model/AgentConfigurationTest.java
  • src/test/java/ai/labs/eddi/engine/runtime/internal/DreamServiceTest.java
📝 Walkthrough

Walkthrough

This PR implements LLM-driven memory summarization ("Dream" consolidation) in DreamService. Configuration schema is extended with summarization thresholds and grouping strategies. DreamService now injects SummarizationService, implements end-to-end consolidation with response parsing and database sequencing, and provides helper methods for grouping and JSON handling. Comprehensive test coverage validates thresholds, LLM response parsing, failure modes, and helper utilities. Documentation is updated throughout.

Changes

DreamService LLM Summarization Feature

Layer / File(s) Summary
Dream Configuration Schema Extension
src/main/java/ai/labs/eddi/configs/agents/model/AgentConfiguration.java, docs/user-memory.md
DreamConfig gains new fields for LLM summarization control: entry thresholds (summarizeMinEntries, summarizeTargetEntries), grouping strategy (summarizeGroupBy), provenance preservation flag, max LLM calls cap (maxSummarizationCalls), and customizable prompt template. Public getters/setters added for each field. Documentation reference table updated.
DreamService Dependency Injection and Metrics
src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java
Constructor updated to inject SummarizationService and ObjectMapper. Micrometer counter for dream.entries.summarized metric added. Class documentation extended to reflect summarization cost semantics and round-robin ordering.
Core Summarization Pipeline
src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java
process() flow now conditionally calls summarizeInteractions() when enabled. summarizeInteractions() implements end-to-end LLM consolidation: grouping by strategy, thresholding, LLM call cap enforcement, prompt serialization, isolated LLM calls with error handling per group, response parsing/validation with output capping, and safe database sequencing (insert-before-delete).
Summarization Helper Methods
src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java
buildGroups() implements category/agent grouping with optional provenance preservation. parseConsolidatedEntries() parses LLM JSON responses with markdown fence stripping and validation. mostRestrictiveVisibility() merges visibility with defined precedence. buildEntriesJson() serializes grouped entries. escapeJson() safely encodes JSON values. estimateCost() added for cost heuristics.
SummarizationService API and Usage
src/main/java/ai/labs/eddi/modules/llm/impl/SummarizationService.java
Adds SummarizationResult record and summarizeWithUsage(...) to return summary text plus token usage; existing summarize(...) delegates to the new API and continues to return "" on swallowed errors.
DreamServiceTest Fixture and Utilities
src/test/java/ai/labs/eddi/engine/runtime/internal/DreamServiceTest.java
Updated constructor mocking to pass SummarizationService. Test helpers makeEntries() and enableSummarization() added for consistent test data generation across summarization test suite.
Summarization Gating and Core Behavior Tests
src/test/java/ai/labs/eddi/engine/runtime/internal/DreamServiceTest.java
Tests for entry-load behavior, threshold-based gating, consolidation counts, LLM response parsing robustness (empty/garbage/markdown responses), group-by modes, provenance preservation. Verify correct mock interactions with summarizationService and store.
Edge Cases, Failure Modes, and Helper Tests
src/test/java/ai/labs/eddi/engine/runtime/internal/DreamServiceTest.java
Tests for parseConsolidatedEntries() and mostRestrictiveVisibility() edge cases. Pruning and contradiction detection coverage. Failure mode tests: LLM returning too many entries (capped), partial delete failures, LLM exceptions (dream cycle succeeds, no artifacts persisted). escapeJson() control character and null input tests. Cost-estimation and max-cost early-stop tests.
Configuration and User-Facing Documentation
docs/user-memory.md, docs/scheduling.md, docs/changelog.md, HANDOFF.md
docs/user-memory.md expanded with summarization behavior, new config fields, interaction summarization description with safety guarantees, and dream.entries.summarized metric. docs/scheduling.md example updated with summarizeInteractions enabled and new tuning fields. New changelog entries (2026-05-15 and 2026-05-16) documenting feature and remediation. HANDOFF.md test count updated (DreamServiceTest: 9 → 40).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 A dream of memories, softly spun tonight,
LLMs condense what once was broad and bright.
Grouped and checked, with safety kept in sight,
Originals wait if summaries don't feel right.
A rabbit hums: small thoughts made tidy, light.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 22.97% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is vague and generic, using a feature branch naming convention rather than a clear description of the main change. Consider revising to a more descriptive title that highlights the primary change, such as 'Add LLM-driven memory summarization to DreamService' or 'Implement Dream interaction consolidation with LLM summarization'.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/dream-summarization

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java (1)

60-60: ⚡ Quick win

Inject ObjectMapper instead of creating a new instance.

Creating a new ObjectMapper instance bypasses Quarkus's CDI-managed Jackson configuration. Quarkus provides a pre-configured, injectable ObjectMapper that respects application-wide customization.

♻️ Proposed fix
-    private final ObjectMapper objectMapper = new ObjectMapper();
+    private final ObjectMapper objectMapper;
     `@Inject`
     public DreamService(IUserMemoryStore userMemoryStore,
             SummarizationService summarizationService,
-            MeterRegistry meterRegistry) {
+            MeterRegistry meterRegistry,
+            ObjectMapper objectMapper) {
         this.userMemoryStore = userMemoryStore;
         this.summarizationService = summarizationService;
         this.meterRegistry = meterRegistry;
+        this.objectMapper = objectMapper;
     }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java` at line
60, The DreamService currently instantiates a new ObjectMapper via the field
"private final ObjectMapper objectMapper = new ObjectMapper();"; replace this
with CDI injection of the Quarkus-managed ObjectMapper (e.g. remove the "new
ObjectMapper()" instantiation and add an injected ObjectMapper either as a
constructor parameter or a field annotated for injection) so DreamService uses
the application-configured Jackson instance; update constructor and usages to
reference the injected "objectMapper" field (keep the same symbol name to
minimize other changes).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/main/java/ai/labs/eddi/configs/agents/model/AgentConfiguration.java`:
- Around line 529-560: The new summarization fields (summarizeMinEntries,
summarizeTargetEntries, summarizeGroupBy, preserveAgentProvenance,
maxSummarizationCalls, summarizationPrompt) should be extracted into an
immutable nested record to follow the project's config guideline; create a
record SummarizationConfig(int minEntries,int targetEntries,String
groupBy,boolean preserveAgentProvenance,int maxCalls,String prompt) with a
no-arg canonical default constructor that sets the current defaults
(5,2,"category",false,10 and the existing prompt), replace the six mutable
fields in DreamConfig with a single private SummarizationConfig summarization =
new SummarizationConfig(), add a public getter (and a setter on DreamConfig that
replaces the whole SummarizationConfig if project pattern requires mutability at
the container level), remove the original six fields, and update any code that
referenced summarizeMinEntries, summarizeTargetEntries, summarizeGroupBy,
preserveAgentProvenance, maxSummarizationCalls or summarizationPrompt to read
from summarization.minEntries(), summarization.targetEntries(), etc.

---

Nitpick comments:
In `@src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java`:
- Line 60: The DreamService currently instantiates a new ObjectMapper via the
field "private final ObjectMapper objectMapper = new ObjectMapper();"; replace
this with CDI injection of the Quarkus-managed ObjectMapper (e.g. remove the
"new ObjectMapper()" instantiation and add an injected ObjectMapper either as a
constructor parameter or a field annotated for injection) so DreamService uses
the application-configured Jackson instance; update constructor and usages to
reference the injected "objectMapper" field (keep the same symbol name to
minimize other changes).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6e331845-406e-4e77-a213-b78d2eea3b74

📥 Commits

Reviewing files that changed from the base of the PR and between 9f3fd10 and 2e4de58.

📒 Files selected for processing (7)
  • HANDOFF.md
  • docs/changelog.md
  • docs/scheduling.md
  • docs/user-memory.md
  • src/main/java/ai/labs/eddi/configs/agents/model/AgentConfiguration.java
  • src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java
  • src/test/java/ai/labs/eddi/engine/runtime/internal/DreamServiceTest.java

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds LLM-driven summarization to the Dream memory consolidation service so user memories can be compressed into fewer entries, with new configuration, metrics, documentation, and tests.

Changes:

  • Implements DreamService summarization using SummarizationService, grouping, parsing, and replacement logic.
  • Adds DreamConfig summarization options and documents them.
  • Expands DreamService tests and updates handoff/changelog documentation.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java Adds LLM summarization flow, metrics, grouping, parsing, and entry replacement logic.
src/main/java/ai/labs/eddi/configs/agents/model/AgentConfiguration.java Adds Dream summarization configuration fields and accessors.
src/test/java/ai/labs/eddi/engine/runtime/internal/DreamServiceTest.java Updates constructor setup and adds summarization/pruning/parser tests.
docs/user-memory.md Documents summarization config, behavior, and metrics.
docs/scheduling.md Updates Dream configuration example with summarization fields.
docs/changelog.md Adds changelog entry for Dream summarization.
HANDOFF.md Updates Dream feature summary and test counts.
Comments suppressed due to low confidence (11)

src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java:286

  • The consolidation writes summaries via upsert, whose key is (userId,key,sourceAgentId) for self/group memories and (userId,key) for global memories. If the LLM reuses any original key, this updates the original row and the following delete loop deletes that same row, so the newly consolidated memory can be lost.
                for (var entry : consolidated) {
                    userMemoryStore.upsert(new UserMemoryEntry(
                            null, userId, entry.key(), entry.value(),
                            groupEntries.getFirst().category(),

src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java:278

  • When entries from multiple agents are summarized together (the default because preserveAgentProvenance is false), a self-visible summary is assigned only the first entry's sourceAgentId. Since recall for self memories filters by sourceAgentId, deleting the originals makes the summary invisible to the other contributing agents.
                Visibility mergedVisibility = mostRestrictiveVisibility(groupEntries);
                String sourceAgent = groupEntries.getFirst().sourceAgentId();
                Instant earliestCreated = groupEntries.stream()

src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java:288

  • Group-visible summaries are written with an empty groupIds list. Both datastore implementations only return group memories when their group_ids overlap the caller's groups, so summarizing group-scoped originals and deleting them makes the replacement unreachable.
                    userMemoryStore.upsert(new UserMemoryEntry(
                            null, userId, entry.key(), entry.value(),
                            groupEntries.getFirst().category(),
                            mergedVisibility, sourceAgent, List.of(),
                            "dream-consolidation", false, 0,

src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java:272

  • summarizeTargetEntries is not validated before capping. If it is configured as 0, subList(0, 0) leaves no consolidated entries to insert, but the code still deletes every original in the group and reports them as summarized.
            // 6. Cap at target
            if (consolidated.size() > config.getSummarizeTargetEntries()) {
                consolidated = consolidated.subList(0, config.getSummarizeTargetEntries());
            }

src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java:295

  • If one consolidated insert succeeds and a later insert fails, the catch skips deleting originals but does not roll back the summaries already inserted. That leaves duplicate/partial consolidated memories despite the safety guarantee that an insert failure preserves the original state.
                for (var entry : consolidated) {
                    userMemoryStore.upsert(new UserMemoryEntry(
                            null, userId, entry.key(), entry.value(),
                            groupEntries.getFirst().category(),
                            mergedVisibility, sourceAgent, List.of(),
                            "dream-consolidation", false, 0,
                            earliestCreated, Instant.now()));
                }
            } catch (Exception e) {
                LOGGER.warnf("[DREAM] Failed to insert consolidated entries for " +
                        "user='%s', group='%s': %s. Originals preserved.",
                        userId, group.getKey(), e.getMessage());
                continue; // Insert failed → don't delete anything

src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java:311

  • reduced is calculated from the number of originals rather than from successful deletes. If any deleteEntry call fails, the method still returns and increments dream.entries.summarized as if those entries were removed, so callers and metrics report memory reduction that did not actually happen.
            for (var original : groupEntries) {
                try {
                    userMemoryStore.deleteEntry(original.id());
                } catch (Exception e) {
                    LOGGER.warnf("[DREAM] Failed to delete original entry '%s': %s. " +
                            "Duplicate will be resolved by contradiction detector.",
                            original.id(), e.getMessage());
                }
            }

            int reduced = groupEntries.size() - consolidated.size();
            totalConsolidated += reduced;
            entriesSummarizedCounter.increment(reduced);

src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java:287

  • When summarizeGroupBy is all, consolidated entries are still assigned the category of the first original entry. Summarizing a mixed fact/preference/context group will misclassify the replacements, which breaks category-based retrieval after the originals are deleted.
                for (var entry : consolidated) {
                    userMemoryStore.upsert(new UserMemoryEntry(
                            null, userId, entry.key(), entry.value(),
                            groupEntries.getFirst().category(),
                            mergedVisibility, sourceAgent, List.of(),

src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java:327

  • Returning immediately for the all grouping ignores preserveAgentProvenance=true, even though the config says that setting keeps entries from different agents separate. With groupBy=all, cross-agent entries are still consolidated together.
        if ("all".equals(config.getSummarizeGroupBy())) {
            // Single group
            return Map.of("all", new ArrayList<>(entries));
        }

src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java:304

  • This recovery path assumes the contradiction detector will clean up duplicates, but detectContradictions only counts and logs conflicts and never deletes or resolves entries. A failed delete can therefore leave duplicate original+summary memories indefinitely.
                    LOGGER.warnf("[DREAM] Failed to delete original entry '%s': %s. " +
                            "Duplicate will be resolved by contradiction detector.",

src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java:383

  • The parser accepts entries as long as the key and value fields exist, even when the key is null/blank. This bypasses the memory guardrails used by normal writes and can create unusable empty-key memories (or cause partial insert failures after earlier summaries were written).
            return entries.stream()
                    .filter(m -> m.containsKey("key") && m.containsKey("value"))
                    .map(m -> new ConsolidatedEntry(m.get("key"), m.get("value")))

src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java:285

  • Consolidated keys and values from the LLM are written directly without applying the memory guardrails (maxKeyLength, maxValueLength, capacity, etc.) that normal memory writes enforce. A malformed or overly long LLM response can therefore store entries that the rest of the user-memory API would reject.
                for (var entry : consolidated) {
                    userMemoryStore.upsert(new UserMemoryEntry(
                            null, userId, entry.key(), entry.value(),

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java Outdated
Comment thread HANDOFF.md Outdated
Comment thread docs/user-memory.md
Comment thread docs/changelog.md Outdated
…forcement, docs fixes

- Inject CDI-managed ObjectMapper instead of new instance (CodeRabbit)

- Enforce maxCostPerRun via SummarizationResult token usage tracking

- Fix user-memory.md config key: dreamConfig -> dream

- Fix HANDOFF.md test count: 45+ -> 90

- Correct contradiction detector docs (detection-only, not resolution)

- 40 DreamServiceTest tests, 0 failures

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/main/java/ai/labs/eddi/modules/llm/impl/SummarizationService.java`:
- Around line 148-149: The catch block in SummarizationService that currently
calls LOGGER.warnf to record summarization failures should use LOGGER.errorf
instead; locate the logging call in SummarizationService (the LOGGER.warnf(e,
"[SUMMARIZATION] Failed to summarize: provider=%s, model=%s, error=%s",
llmProvider, llmModel, e.getMessage()) invocation) and replace warnf with errorf
so failures are logged at ERROR level while keeping the same message,
parameters, and exception argument.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8cebc007-74b7-4b93-a94f-c7590283e08d

📥 Commits

Reviewing files that changed from the base of the PR and between 2e4de58 and c24cc2d.

📒 Files selected for processing (6)
  • HANDOFF.md
  • docs/changelog.md
  • docs/user-memory.md
  • src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java
  • src/main/java/ai/labs/eddi/modules/llm/impl/SummarizationService.java
  • src/test/java/ai/labs/eddi/engine/runtime/internal/DreamServiceTest.java
✅ Files skipped from review due to trivial changes (3)
  • HANDOFF.md
  • docs/changelog.md
  • docs/user-memory.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java

Comment thread src/main/java/ai/labs/eddi/modules/llm/impl/SummarizationService.java Outdated
ginccc added 2 commits May 16, 2026 16:43
…, exception handling

Must-fix: eliminate redundant DB reload, align maxCostPerRun default

(.50 everywhere), fix scheduling.md contradiction claim

Should-fix: estimateCost includes input length, summarizeWithUsage

re-throws (summarize wrapper swallows for compat), annotate dead

contradictionResolution field, remove unused hasContent(), fix counts

Nitpicks: buildEntriesJson uses ObjectMapper, stale Javadoc fixed

58 tests (40+12+6), 0 failures
…hecked exception wrapping

60 tests (40+12+8), 0 failures. JaCoCo: DreamService 92% line, SummarizationService 100% line.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/main/java/ai/labs/eddi/modules/llm/impl/SummarizationService.java`:
- Around line 151-155: In SummarizationService's RuntimeException catch block
(the handler that calls errorCounter.increment() and currently uses
LOGGER.warnf), change the logging call from LOGGER.warnf(...) to
LOGGER.errorf(...) so runtime failures are logged at ERROR level with the same
formatted message (include llmProvider, llmModel, and e.getMessage()), and keep
the increment and rethrow behavior intact.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d3649c37-7022-4ff9-beba-edff1d8e45d1

📥 Commits

Reviewing files that changed from the base of the PR and between c24cc2d and d5b1640.

📒 Files selected for processing (8)
  • HANDOFF.md
  • docs/changelog.md
  • docs/scheduling.md
  • src/main/java/ai/labs/eddi/configs/agents/model/AgentConfiguration.java
  • src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java
  • src/main/java/ai/labs/eddi/modules/llm/impl/SummarizationService.java
  • src/test/java/ai/labs/eddi/engine/runtime/internal/DreamServiceTest.java
  • src/test/java/ai/labs/eddi/modules/llm/impl/SummarizationServiceTest.java
✅ Files skipped from review due to trivial changes (2)
  • docs/scheduling.md
  • docs/changelog.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/main/java/ai/labs/eddi/configs/agents/model/AgentConfiguration.java
  • src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java
  • src/test/java/ai/labs/eddi/engine/runtime/internal/DreamServiceTest.java

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.

Comment thread src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java Outdated
Comment thread src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java Outdated
Comment thread src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java Outdated
Comment thread src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java Outdated
Comment thread src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java Outdated
Comment thread src/main/java/ai/labs/eddi/engine/runtime/internal/DreamService.java Outdated
ginccc added 2 commits May 16, 2026 18:37
…ardrails

High: multi-agent visibility upgrade (self→global), groupId preservation,

summarizeTargetEntries >=1 validation (prevents data loss)

Medium: partial insert rollback, accurate delete metrics, null-safe

category grouping, LLM output key/value guardrails (blank+length)

Low: SummarizationService warnf→errorf for exception handlers

71 tests (51+12+8), 0 failures. JaCoCo: DreamService 91.9% line
@ginccc
ginccc requested a review from rolandpickl May 16, 2026 23:35
@ginccc
ginccc merged commit 4f76e12 into main May 20, 2026
23 checks passed
@ginccc
ginccc deleted the feature/dream-summarization branch May 20, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants